#ifndef INTERVAL_6EHHURI1

#define INTERVAL_6EHHURI1

#include <set>

enum eOrientation
{
    DOUBLE_ORIENTATION,
    POSITIVE_ORIENTATION,
    NEGATIVE_ORIENTATION
};


class Interval
{
public:
    
    /** 
     * @brief Constructor
     * 
     * @param x Min point
     * @param y Max point
     */
    Interval ( unsigned int x, unsigned int y, eOrientation orientation = DOUBLE_ORIENTATION );

    /** 
     * @brief add element in interval
     * 
     * @param u element to add
     */
    void add( unsigned int u );

    void reinit();

    bool setOrientation(eOrientation orientation);

    virtual ~Interval ();


    unsigned int getX() {
        return _x;
    }
    unsigned int getY(){
        return _y;
    }
    eOrientation getOrientation() {
        return _eOrientation;
    }
    std::set<unsigned int>& getList(){
        return _vList;
    }

    bool contains(unsigned int x);

private:
    unsigned int _x;
    unsigned int _y;
    eOrientation _eOrientation;

    std::set<unsigned int> _vList;
};

#endif /* end of include guard: INTERVAL_6EHHURI1 */
